import {NativeModules, View, ViewProps} from 'react-native';

export enum SVProgressHUDStyle {
    SVProgressHUDStyleLight = "light",        // default style, white HUD with black text, HUD background will be blurred
    SVProgressHUDStyleDark = "dark",         // black HUD and white text, HUD background will be blurred
    SVProgressHUDStyleCustom = "custom"        // uses the fore- and background color properties
}

export enum SVProgressHUDMaskType {
    SVProgressHUDMaskTypeNone = "None",
    SVProgressHUDMaskTypeClear = "Clear",
    SVProgressHUDMaskTypeBlack = "Black",
    SVProgressHUDMaskTypeGradient = "Gradient",
    SVProgressHUDMaskTypeCustom = "Custom",
}

interface HUDProgress extends View {
    showWithStatus: (status: string) => void;
    dismiss: (callback?:()=>void) => void;
    showErrorWithStatus: (status: string) => void;
    showSuccessWithStatus: (status: string) => void;
    setBackgroundColor: (color: string) => void;
    setDefaultStyle: (style: SVProgressHUDStyle) => void;
    setDefaultMaskType: (style: SVProgressHUDMaskType) => void;
    setMinimumSize: (width:number, height:number) => void;
    setImageViewSize: (width:number, height:number) => void;
}

const HUDProgress: HUDProgress = NativeModules["HUDProgress"];
export default HUDProgress;
